package ynu.lcy.elememicroserviceserviceclient.service;

import org.springframework.transaction.annotation.Transactional;
import ynu.lcy.dto.order.AddOrderRequestDTO;
import ynu.lcy.entity.Order;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 订单服务
 * @author 梁超映
 * */
@Deprecated
public interface OrderService {

    /**
     * 创建订单
     *
     * @param dto     订单信息
     * @param request 请求
     */
    @Transactional
    public Order create(AddOrderRequestDTO dto, HttpServletRequest request);

    /**
     * 订单支付
     *
     * @param orderId 订单ID
     * @return 订单
     */
    public Order payOrder(Long orderId);

    /**
     * 获取订单
     * @param orderId 订单编号
     *
     * @return 订单
     * */
    public Order getOrderByOrderId(Long orderId);

    /**
     * 获取全部订单
     * @param request 请求
     * @return 订单列表
     * */
    public List<Order> list(HttpServletRequest request);

}
